library(ordinal)
data = read.csv(file.choose(),header=TRUE) #loads full results table
data$ORating = as.ordered(data$Rating) #creates Rating column to be treated ordinally
model = clmm(ORating ~ Condition*Scalar + (1|Participant) + (1|Story), data = data)
model2 = clmm(ORating ~ Condition+Scalar + (1|Participant) + (1|Story), data = data)
anova(model, model2)
library(lsmeans)
lsm = lsmeans(model, pairwise ~ Scalar*Condition)
lsm2 = lsmeans(model, pairwise ~ Scalar)
library(multcompView)
cld(lsm, alpha = 0.05, adjust = "tukey")
